<?php foreach($model as $key=>$value){ ?>
<li>
<div class="col1">
   <div class="cont">
      <div class="cont-col1">                              
            <span class="badge badge-info" style="margin-bottom : -10px"><?php echo $key+1; ?></span>
      </div>
      <div class="cont-col2">
         <div class="desc">
           <?php echo CHtml::link($value->members->username,array("/Events/default/eventMembers","id"=>$value->member_id),array("target"=>"_blank")) ?>
           <?php 
           $criteria = new CDbCriteria();
           $criteria->condition = 'member_id = :member_id';
           $criteria->params = array(':member_id' => $value->member_id);
           $count = Events::model()->count($criteria);
           
            ?>
             <span class="badge badge-success " style=""><?php echo $count; ?></span>
         </div>   
      </div>
   </div>
</div>
</li>
<?php } ?>